package com.ynding.cloud.common.model.bo;

/**
 * <p> 认证常量 </p>
 *
 * @author ynding
 * @version 2021/7/26
 **/
public class AuthConstants {

    /**
     * JWT令牌前缀
     */
    public static final String JWT_TOKEN_PREFIX = "Bearer ";
    /**
     * 认证信息Http请求头
     */
    public static final String TOKEN_HEADER = "Authorization";

    /**
     * Redis缓存权限规则key
     */
    public static final String RESOURCE_ROLES_KEY = "auth:resourceRoles";

    /**
     * 黑名单token前缀
     */
    public static final String TOKEN_BLACKLIST_PREFIX = "auth:token:blacklist:";

    /**
     * 后台管理接口路径匹配
     */
    public static final String ADMIN_URL_PATTERN ="/user/**" ;

    /**
     * JWT ID 唯一标识
     */
    public static final String JWT_JTI = "jti";

    /**
     * JWT载体key
     */
    public static final String JWT_PAYLOAD_KEY = "payload";

    /**
     * JWT存储权限前缀
     */
    public static final String AUTHORITY_PREFIX = "ROLE_";

    /**
     * JWT存储权限属性
     */
    public static final String JWT_AUTHORITIES_KEY = "authorities";

}
